package com.lz.base.project.thread.completableFuture;

import com.lz.base.common.utils.http.OkHttpUtil;
import com.lz.base.common.utils.http.SstInf;

import java.util.concurrent.Callable;

public class Weather {

    public static String getWeather(String principal) throws Exception {
        String s = "";
        try {
            String annualRate = "3";
            String duration = "100";
            String type = "year";
            SstInf sstInf = new SstInf();
            sstInf.setInfFullUrl("https://api.pearktrue.cn/api/investmentincome/");
            sstInf.setInfRequest("{principal: " + principal + ",annualRate: " + annualRate + ",duration: " + duration + ",type: " + type + "}");
            s = OkHttpUtil.requestGet(sstInf);
            System.out.println("city:" + s);
        } catch (Exception e) {
        }
        return s;
    }
}